<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>

        // Array.from(xxx)
        // Array.prototype.slice.call(xxx)
        // Array.prototype.slice.apply(xxx)
        // [...xxx]

        // function printInfo(a, b, c, ...args) {
        //     console.log(args)
        // }
        // 类数组
        function printInfo() {
            // console.log(arguments)
            // console.log(Array.from(arguments))
            // console.log(Array.prototype.slice.call(arguments))
            // console.log(Array.prototype.slice.apply(arguments))
            console.log([...arguments])
        }
        printInfo(1, 2, 3, 4, 5, 6, 7, 8, 9)
    </script>
</body>

</html>